1. Field of the Invention
The invention relates to memories, and more particularly to flash memories.
2. Description of the Related Art
A conventional flash memory device stores data for a host and comprises a controller and a flash memory. The flash memory comprises a plurality of blocks for data storage, and the controller manages the data of the flash memory. When the host wants to write data to the flash memory, the host sends a write command to the flash memory device, and the controller then writes data to the flash memory according to the write command. When the host wants to read data from the flash memory, the host sends a read command to the flash memory device, and the controller then reads data from the flash memory according to the read command and then sends the read-out data back to the host.
When the host sends a write command to the flash memory device to order the flash memory device to write data thereto, the data amount processed by the flash memory is often greater than the data amount sent from the host. When an old block with the write address comprised by the write command has stored old data, the controller must remove the old data from the old block before the write data is written to the write address of the old block. When the old data cannot be removed from the old block, the controller must allocate a new block from the flash memory for the write data, and then the write data is stored to the new block instead of the old block. When the new block has no extra space to store new data, the controller must integrate the write data stored in the new block and the old data stored in the old block to obtain integrated data, and then the integrated data is written to a spare block. All aforementioned operations of data being removed and data being integrated increases the data processing load of the controller, extends the time period required by executing the write command, and degrades the performance of the flash memory device.
A criterion for measuring a performance level of a flash memory device is a write amplifier index (WAI). The write amplifier index is equal to a ratio of a data amount physically processed by a flash memory of the flash memory device to a data amount sent from a host to the flash memory device. When the host sends a write command to the flash memory device to order the flash memory device to write a small amount of the data from the flash memory, if the controller physically accesses a large amount of data from the flash memory, the controller processes the write command with low efficiency and poor performance, and the WAI value of the flash memory device is high. When the host sends a write command to the flash memory device to order the flash memory device to write a small amount of data from the flash memory, if the controller physically access a smaller amount of data from the flash memory, the controller processes the write command with high efficiency and good performance, and the WAI value of the flash memory device is low.
To improve the performance of a flash memory device, the WAI value of the flash memory device must be lowered. The invention therefore provides a data access method for a flash memory device to lower a value of a write amplifier index of the flash memory device, thereby improving the performance of the flash memory device.